home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / misc_pto / mwpetz09 / poepoem.cpp < prev    next >
C/C++ Source or Header  |  1991-05-30  |  683b  |  35 lines

  1. #include "poepoem.hpp"
  2.  
  3. poem::poem():AppFrame() {
  4.     create();
  5.     caption("zApp ""Annabel Lee "" by Edgar Allen Poe");
  6.     ico=new Icon(ResId("poepoem"));
  7.     setIcon(ico);
  8. #ifdef MEWEL
  9.     UserResource *x=new UserResource(ResId("AnnabelLee"),"STEXT");
  10. #else
  11.     UserResource *x=new UserResource(ResId("AnnabelLee"),"TEXT");
  12. #endif
  13.  
  14.     int numLines=0;
  15.     for (char *pText=(char*)(void*)*x;*pText!='\\' && *pText!='\0';) {
  16.         if (*pText=='\n') numLines++;
  17.         pText=AnsiNext(pText);
  18.     }
  19.  
  20.     t=new QuickText(this,numLines+2);
  21.     t->put((char*)(void*)*x);
  22.     delete x;
  23. }
  24.  
  25. poem::~poem() {
  26.     delete ico;
  27.     delete t;
  28. }
  29.  
  30. void App::main() {
  31.     AppFrame *p=new poem;
  32.     app->go();
  33.     delete p;
  34. }
  35.